// @Description
// @Author  xiaoyang
// @Date  2025/11/26 5:21 PM

package routers

import (
	"github.com/gin-gonic/gin"
	"golang-manage-admin/http/middles"
)

// registerDemoRoutes 注册 Demo 模块路由
// 包含：测试功能、演示功能、延时任务等
func registerDemoRoutes(api *gin.RouterGroup) {
	// === 测试相关路由 ===
	testGroup := api.Group("/test",
		middles.CheckIp(),
		//middles.CheckSign(),
		middles.SetupValidator())
	{
		// 测试功能
		testGroup.POST("test", InitController.Demo.TestController.TestMessage)
		testGroup.GET("test-net", InitController.Demo.TestController.TestSendMessageDelayedByNet)
		testGroup.GET("test-queue", InitController.Demo.TestController.TestSendMessageToQueue)
		testGroup.GET("test-queue-message-expiration", InitController.Demo.TestController.TestSendMessageExpiration)
		testGroup.GET("test-queue-message-delayed", InitController.Demo.TestController.TestSendMessageDelayed)

		// 延时任务调度
		testGroup.POST("send-delayed-task", InitController.Demo.DelayedController.SendDelayedTask)
	}
}
